package demoMod.stsconsole.chests;

import demoMod.stsconsole.dungeons.AbstractDungeon;
import demoMod.stsconsole.relics.AbstractRelic;
import demoMod.stsconsole.rewards.GoldReward;
import demoMod.stsconsole.rewards.RelicReward;

public class MediumChest extends AbstractChest {
    @Override
    public void open() {
        int roll = AbstractDungeon.cardRewardRng.nextInt(100);
        if (roll < 17) {
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new RelicReward(AbstractRelic.RelicRarity.RARE));
        } else if (roll < 50) {
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new RelicReward(AbstractRelic.RelicRarity.UNCOMMON));
        } else {
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new RelicReward(AbstractRelic.RelicRarity.COMMON));
            AbstractDungeon.currDungeon.currMapNode.room.rewards.add(new GoldReward(45, 55));
        }
        super.open();
    }
}
